﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MovieRental.Entities;

namespace MovieRental.BuisnessComponents.Exceptions
{
    public class DataValidationException : VerificationException
    {
        public DataValidationException(string formatString, BaseEntity<Guid> obj, string fieldName, Exception innerException)
            :base(string.Format(formatString, fieldName, obj.ToString()), innerException)
        {
            Object = obj;
            FieldName = fieldName;
        }

        public BaseEntity<Guid> Object { private set; get; }

        public string FieldName { private set; get; }
    }
}
